package com.example.animal;

public class AnimalTest {
    public static void main(String[] args) {
        Dog[] dogs = new Dog[3];
        dogs[0] = new Dog("黄毛",5,"黄");
        dogs[1] = new Dog("大黑",2,"黑");
        dogs[2] = new Dog("小黑",3,"黑");
        System.out.println(dogs[0].name);
        for(int i = 0;i<dogs.length;i++){
            System.out.println(dogs[i].name);
//            dogs[i].lookHome();
            dogs[i].eat();
        }
    }
}
